const sequelize = require('sequelize')
const db = require('@/database')


//定义影院数据表模型
const Cinema = db.define('aa_cinema', {
    id: {
        type: sequelize.INTEGER,
        primaryKey: true,//主键
        autoIncrement: true,//自动增长
        allowNull: false,//不允许为空
        field: 'id',
        comment: '主键,影院ID'
    },
    introduction: {
        type: sequelize.STRING(),
        allowNull: false,
        field: 'introduction',
        comment: '简介'
    },
    location: {
        type: sequelize.STRING(),
        allowNull: false,
        field: 'location',
        comment: '位置',
    },
    name: {
        type: sequelize.STRING(),
        allowNull: false,
        field: 'name',
        comment: '名称'
    },
    is_delete: {
        type: sequelize.BOOLEAN(),
        field: 'is_delete',
        comment: '是否删除',
        defaultValue: false,
        allowNull: false
    }
}, { timestamps: true, updatedAt: false });
//抛出模型
module.exports = Cinema